package com.crane.oss.common.bean.resp;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public class KeyValueResp implements Serializable {


    public KeyValueResp() {

    }


    public KeyValueResp(String label, String value) {
        this.label = label;
        this.value = value;
    }


    public KeyValueResp(String label, String value,String childLabel,String childValue) {
        this.label = label;
        this.value = value;
        this.list=new ArrayList<>();
        this.list.add(new KeyValueResp(childLabel,childValue));
    }
    /**
     * label : xxx
     * value : xxx
     * list : [{"label":"xxx","value":"xxx"}]
     */

    private String label;
    private String value;
    private List<KeyValueResp> list;

}
